<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>92Play后台管理</title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/managercss.css" />
<style type="text/css">
<!--
body {
	margin-left: 5px;
	margin-top: 5px;
	margin-right: 5px;
	background:#EFEFEF;
}
-->
</style>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.4.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery.form.js"></script>
<script type="text/javascript">
	$(function(){
		$("#update").click(function(){
			var companyName = $("#companyName").val();
			if(companyName==''){
				alert("请输入厂商名称!");
				$("#companyName").focus();
				return;
			}else{
				var date = $("#companyForm").formSerialize();
				$.ajax({
					url:"<%=request.getContextPath() %>/admin/company/modify",
					data:date,
					type:"POST",
					dataType: "text",
					success:function(flag){
						if(flag=='1'){
							alert("修改成功!");
							//window.location.href= "<%=request.getContextPath() %>/admin/company";
							 parent.location.reload();
						}else{
							alert("修改失败!");
						}
					}
				});
				return;
			}
		});
	});
</script>
</head>
<body>
<div class="information">
	<div class="title">${company.companyName }</div>
	<div class="list">
		<form method="post" id="companyForm">
		<input type="hidden" name="companyId" id="companyId" value="${company.companyId }">
		<div class="noselect">
			<ul>
				<li style="width: 100px;text-align: right;">SP名称：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="companyName" id="companyName" value="${company.companyName }" size="30"/>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">公司简介：</li>
				<li style="width: 300px;text-align: left;">
					<textarea rows="5" cols="25" name="companyMemo" id="companyMemo">${company.companyMemo }</textarea>
				</li>
			</ul>
			<!-- 
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">地址：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="companyAddr" id="companyAddr" value="${company.companyAddr }" size="30" />
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">电话：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="companyTel" id="companyTel" value="${company.companyTel }" size="30" />
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">传真：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="companyFax" id="companyFax" value="${company.companyFax }" size="30" />
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">主页：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="companyHome" id="companyHome" value="${company.companyHome }" size="30" />
				</li>
			</ul> -->
			<div class="clear"></div>
			
			<ul>
				<li style="width: 100px;text-align: right;">业务线：</li>
				<li style="width: 300px;text-align: left;">
					<select name="bussiness">
						<c:if test="${company.bussiness == 'SMS'}">
						<option value="SMS" selected="selected">SMS</option>
						</c:if>
						<c:if test="${company.bussiness != 'SMS'}">
						<option value="SMS">SMS</option>
						</c:if>
						
						<c:if test="${company.bussiness == 'MMS'}">
						<option value="MMS" selected="selected">MMS</option>
						</c:if>
						<c:if test="${company.bussiness != 'MMS'}">
						<option value="MMS">MMS</option>
						</c:if>
						
						<c:if test="${company.bussiness == 'IVR'}">
						<option value="IVR" selected="selected">IVR</option>
						</c:if>
						<c:if test="${company.bussiness != 'IVR'}">
						<option value="IVR">IVR</option>
						</c:if>
						
						<c:if test="${company.bussiness == '视频基地'}">
						<option value="视频基地" selected="selected">视频基地</option>
						</c:if>
						<c:if test="${company.bussiness != '视频基地'}">
						<option value="视频基地">视频基地</option>
						</c:if>
						<c:if test="${company.bussiness == '百宝箱游戏'}">
						<option value="百宝箱游戏" selected="selected">百宝箱游戏</option>
						</c:if>
						<c:if test="${company.bussiness != '百宝箱游戏'}">
						<option value="百宝箱游戏">百宝箱游戏</option>
						</c:if>
						
						<c:if test="${company.bussiness == 'G+游戏'}">
						<option value="G+游戏" selected="selected">G+游戏</option>
						</c:if>
						<c:if test="${company.bussiness != 'G+游戏'}">
						<option value="G+游戏">G+游戏</option>
						</c:if>
						<c:if test="${company.bussiness == '动漫基地'}">
						<option value="动漫基地" selected="selected">动漫基地</option>
						</c:if>
						<c:if test="${company.bussiness != '动漫基地'}">
						<option value="动漫基地">动漫基地</option>
						</c:if>
						
						<c:if test="${company.bussiness == '阅读基地'}">
						<option value="阅读基地" selected="selected">阅读基地</option>
						</c:if>
						<c:if test="${company.bussiness != '阅读基地'}">
						<option value="阅读基地">阅读基地</option>
						</c:if>
						
						<c:if test="${company.bussiness == 'MM基地'}">
						<option value="MM基地" selected="selected">MM基地</option>
						</c:if>
						<c:if test="${company.bussiness != 'MM基地'}">
						<option value="MM基地">MM基地</option>
						</c:if>
						<c:if test="${company.bussiness == 'MDO业务'}">
						<option value="MDO业务" selected="selected">MDO业务</option>
						</c:if>
						<c:if test="${company.bussiness != 'MDO业务'}">
						<option value="MMDO业务">MDO业务</option>
						</c:if>
					</select>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">分成比率：</li>
				<li style="width: 300px;text-align: left;">
					<textarea rows="5" cols="30" name="percent" id="percent">${company.sppercent }</textarea>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">结算周期：</li>
				<li style="width: 300px;text-align: left;">
					<input type="text" name="check" id="check" value="${company.spcheck }">
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">指令概述：</li>
				<li style="width: 300px;text-align: left;">
					<textarea rows="5" cols="30" name="commandMemo" id="commandMemo">${company.commandMemo }</textarea>
				
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">状态：</li>
				<li style="width: 300px;text-align: left;">
					<select name="status">
						<c:if test="${spstatus == 1}">
							<option value="1">有效</option>
							<option value="0">无效</option>
						</c:if>
						<c:if test="${spstatus == 0}">
							<option value="0">无效</option>
							<option value="1">有效</option>
						</c:if>
					</select>
				</li>
			</ul>
			<div class="clear"></div>
			<ul>
				<li style="width: 100px;text-align: right;">&nbsp;</li>
				<li style="width: 300px;text-align: left;">
					<input type="button" id="update" value="修 改" />&nbsp;&nbsp;
				</li>
			</ul>
			<div class="clear"></div>
		</div>
		</form>
	</div>
</div>
</body>
</html>